package com.tony.study.designMode.DM5_建造者模式;

import com.tony.study.designMode.DM5_建造者模式.DM5.Cake;
import com.tony.study.designMode.DM5_建造者模式.DM5.CakeMaker;
import com.tony.study.designMode.DM5_建造者模式.DM5.CakeSeller;

/**
 * Created with IntelliJ IDEA.
 *
 * @Title: BuilderTest
 * @Auther: 皮蛋布丁
 * @Date: 2021/11/01/21:32
 * @Description: 建造者模式测试（客户订购蛋糕）
 * 流程：蛋糕师->销售->顾客
 */
public class BuilderTest {

    public static void main(String[] args) {
        CakeMaker cakeMaker = new CakeMaker("忙活了一天的陈师傅");

        CakeSeller cakeSeller = new CakeSeller();

        Cake cake = cakeSeller.sell(cakeMaker);
        cake.show();    //没必要显示，只是为了说明蛋糕不是平白无故造出来的


    }
}
